package ma.klagrida;

import javax.faces.bean.ManagedBean;

 
import org.primefaces.event.SlideEndEvent;
 
@ManagedBean
public class SliderBean {
	 
	private int number;
	
	private int number2;
	
	private String category = "Start";

	public int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
	}
	

	public int getNumber2() {
		return number2;
	}

	public void setNumber2(int number2) {
		this.number2 = number2;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public void onSlideEnd(SlideEndEvent event) {
	 	int value = event.getValue();
	 	switch (value) {
			case 50:
				category = "medium";
				break;
			case 100:
				category = "large";
				break;
			case 0:
			default:
				category = "start";
				break;
		}
	 	
	 	number2 = value;
	}
	

}
